home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / msynctool < prev    next >
Encoding:
Text File  |  2010-11-16  |  1.5 KB  |  52 lines

  1. # bash completion for msynctool
  2.  
  3. have msynctool &&
  4. _msynctool()
  5. {
  6.     local cur prev anteprev
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur prev anteprev
  10.  
  11.     case $anteprev in
  12.         --configure)
  13.             COMPREPLY=( $( compgen -W "$(msynctool --showgroup \
  14.                 $prev | awk '/^Member/ {print $2}' | sed \
  15.                 -e 's/:$//' )" -- "$cur" ) )
  16.             return 0
  17.             ;;
  18.         --addmember)
  19.             COMPREPLY=( $( compgen -W '$(msynctool --listplugins \
  20.                 | sed -e '1d' )' -- "$cur" ) )
  21.             return 0
  22.             ;;
  23.     esac
  24.  
  25.     case $prev in
  26.         --configure|--addgroup|--delgroup|--showgroup|--sync|--addmember)
  27.             COMPREPLY=( $( compgen -W '$(msynctool --listgroups \
  28.                 | sed -e '1d' )' -- "$cur" ) )
  29.             return 0
  30.             ;;
  31.         --showformats|--filter-objtype|--slow-sync)
  32.             COMPREPLY=( $( compgen -W '$(msynctool --listobjects \
  33.                 | sed -e '1d' )' -- "$cur" ) )
  34.             return 0
  35.             ;;
  36.     esac
  37.  
  38.     COMPREPLY=( $( compgen -W '--listgroups --listplugins --listobjects \
  39.         --showformats --showgroup --sync --filter-objtype --slow-sync \
  40.         --wait --multi --addgroup --delgroup --addmember --configure \
  41.         --manual --configdir --conflict' -- "$cur" ) )
  42. } &&
  43. complete -F _msynctool msynctool
  44.  
  45. # Local variables:
  46. # mode: shell-script
  47. # sh-basic-offset: 4
  48. # sh-indent-comment: t
  49. # indent-tabs-mode: nil
  50. # End:
  51. # ex: ts=4 sw=4 et filetype=sh
  52.